import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store'
import i18n from '@/i18n'
import echarts from 'echarts'

import '@/filter'
import '@/directive'
import '@/test'

import '@/router/modules'

import '@/element-ui'
import '@/axios'

import '@/utils/error-log'

import '@/styles/aside.less'
import '@/assets/fonts/iconfont.css'

Vue.prototype.$echarts = echarts

// Vue.config.productionTip = false

// Vue.config.errorHandler = function(err, vm, info, a) {
//   console.log('error: ', err, vm, info, a)
//   Vue.nextTick(() => {
//     store.dispatch('error/addErr', {
//       err,
//       vm,
//       info,
//       url: window.location.href,
//       a
//     })
//   })
// }

new Vue({
  i18n,
  router,
  store,
  created() {
    console.error('错了没')
  },
  render: h => h(App)
}).$mount('#app')

console.info('vue:', Vue.prototype)
